Skip to content

fix(server): require default challenge expiry#39

Open
EfeDurmaz16 wants to merge 1 commit into
tempoxyz:mainfrom
EfeDurmaz16:fix/default-expires-verification
Open

fix(server): require default challenge expiry#39
EfeDurmaz16 wants to merge 1 commit into
tempoxyz:mainfrom
EfeDurmaz16:fix/default-expires-verification

Conversation

@EfeDurmaz16
Copy link
Copy Markdown

Summary

  • enforce the effective default challenge expiry when verifying credentials
  • reject credentials that omit expires even when VerifyParams.Expires was not explicitly set
  • add a regression test for the default-expiry path

Why

VerifyOrChallenge issues challenges with a default five-minute expiry when VerifyParams.Expires is empty. Verification should enforce that same effective expiry policy. Previously the missing-expires check only ran when params.Expires was explicitly set, so credentials without an expires field could pass the default-expiry path.

Verification

  • go test ./pkg/server -run TestVerifyOrChallenge_RejectsMissingDefaultExpires -count=1 failed before the fix
  • go test ./pkg/server -run TestVerifyOrChallenge -count=1
  • go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant